1. Field of the Invention
The present invention relates to a printer having a function to control a non-volatile memory, and, more particularly, to a printer, which will perform initialization and rewriting of data stored in a non-volatile memory, the initialization of the printer, and printing of the data stored in the non-volatile memory in response to a control command from a host machine, such as a host computer, without involving a troublesome switching operation or requiring sequential discrimination of many control commands.
2. Description of the Related Art
Generally, printers are designed in such a way that they are automatically set with various initial values immediately after being powered on and start functioning in accordance with the initial values. The initial values are stored in a non-volatile memory, such as EEPROM (Electrically Erasable Programmable Read Only Memory), so that they will remain retained when powered off. To rewrite the initial values stored in the EEPROM, switches on an operation panel should normally be operated. Some of the initial values can be rewritten temporarily on a RAM (Random Access Memory), while retained in the EEPROM, by a control command from a host computer or the like.
There is a printer which is so designed as to rewrite the initial values stored in its EEPROM, not temporarily, by a control command sent from a host machine. Such a printer is disclosed in, for example, Japanese Unexamined Patent Publication No. sho 63-209967. The disclosed printer discriminates first initial data change command from other commands sent from the host machine. If the initial data change command is discriminated, the printer receives an address in the EEPROM specified as a parameter. Then, the printer receives change data and writes that data in the EEPROM at the already received address. With the contents of the EEPROM altered, when the printer is powered off and then powered on again, or the host machine is reset, a reset signal (INPUT PRIME signal) will be input via an interface cable to the printer, forcibly returning the control program of the printer to the initial flow, and the CPU will initialize individual sections of the printer according to the altered contents of the EEPROM.
A printer with another structure is disclosed in Japanese Unexamined Patent Publication No. hei 4-133782. In this case, a transmit-receive device is connected to an external interface section, and a message from a master control section is displayed on a display section of this device. Reading that message, a user uses a keyboard or the like to enter data. The entered data will be transferred to the master control section via the external interface section, and the master control section will rewrite the settings of a memory switch section based on the transferred data.
The above-described conventional structures raise the following shortcomings. First, the system of rewriting the contents of the EEPROM through the operation of switches on the operation panel involves a troublesome switching operation and prevents easy rewriting. In addition, when many printers are used, such a bothersome work should be performed individually. The system disclosed in Japanese Unexamined Patent Publication No. sho 63-209967 is advantageous over the first one in that rewriting can be accomplished by using a control command from a host machine, so that with the use of many printers, data in the EEPROMs in those printers can be collectively rewritten by some operation from the host machine side. There are, however, generally multifarious printing conditions that are to be stored in a non-volatile memory, so numerous control commands prepared for the conditions should be discriminated sequentially, which would take time to rewrite the contents of the EEPROM. This problem will be discussed below more specifically. In the case of Japanese Unexamined Patent Publication No. shod 63-209967, the printer receives an address and data to be written at that address, and writes the data at the specified address in the non-volatile memory. That is, a single command will rewrite just one address, so changing a plurality of conditions (e.g., setting various conditions) requires a command to be sent for each address (each condition). This takes much time.
In the case of the method described in Japanese Unexamined Patent Publication No. hei 4-133782, it is necessary to operate an input section, such as a keyboard, so that a tedious work is inevitable.
In either prior art system, to perform printer initialization based on the rewritten contents of the EEPROM, the printer should be powered off and then powered on again, or the host machine should be reset, which still involves a troublesome operation. Further, to print out data in the EEPROM to check if the data in the EEPROM has been rewritten properly, the user should perform a troublesome switching operation.